package io.renren.modules.erp.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.renren.modules.erp.entity.AccountHead;
import io.renren.modules.erp.entity.AccountHeadVo4ListEx;
import io.renren.modules.erp.vo.DepotHeadVo4List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Mapper
public interface AccountHeadMapperEx {

    List<AccountHeadVo4ListEx> selectByConditionAccountHead(
            @Param("type") String type,
            @Param("creatorArray") String[] creatorArray,
            @Param("billNo") String billNo,
            @Param("beginTime") String beginTime,
            @Param("endTime") String endTime,
             Page<AccountHeadVo4ListEx> page);

    List<AccountHeadVo4ListEx> getReceiptList(
            @Param("billNo") String billNo,
            @Param("type") String type,
            @Param("creatorArray") String[] creatorArray,
            @Param("status") String status,
            @Param("organName") String organName,
            @Param("beginTime") String beginTime,
            @Param("endTime") String endTime,
            @Param("totalPriceMin") String totalPriceMin,
            @Param("totalPriceMax") String totalPriceMax,
            Page<AccountHeadVo4ListEx> page);


    List<AccountHeadVo4ListEx> getPaymentList(
            @Param("billNo") String billNo,
            @Param("type") String type,
            @Param("creatorArray") String[] creatorArray,
            @Param("status") String status,
            @Param("organName") String organName,
            @Param("beginTime") String beginTime,
            @Param("endTime") String endTime,
            @Param("totalPriceMin") String totalPriceMin,
            @Param("totalPriceMax") String totalPriceMax,
            Page<AccountHeadVo4ListEx> page,
            @Param("paymentType") String paymentType);


    List<AccountHeadVo4ListEx> getVerificationList(
            @Param("billNo") String billNo,
            @Param("type") String type,
            @Param("creatorArray") String[] creatorArray,
            @Param("status") String status,
            @Param("organName") String organName,
            @Param("beginTime") String beginTime,
            @Param("endTime") String endTime,
            @Param("totalPriceMin") String totalPriceMin,
            @Param("totalPriceMax") String totalPriceMax,
            Page<AccountHeadVo4ListEx> page,
            @Param("serviceType") String serviceType);



    List<AccountHeadVo4ListEx> getReceivableList(@Param("type")String type, @Param("creatorArray") String[] creatorArray,
                                                 @Param("organName")String organName, @Param("beginTime") String beginTime,
                                                 @Param("endTime")String endTime,@Param("userName") String userName,
                                                 @Param("receivablesBillno")String receivablesBillno,
                                                 Page<AccountHeadVo4ListEx> page);


    List<AccountHeadVo4ListEx> getAccountableList(@Param("type")String type, @Param("creatorArray") String[] creatorArray,
                                                 @Param("organName")String organName, @Param("beginTime") String beginTime,
                                                 @Param("endTime")String endTime,@Param("userName") String userName,
                                                 @Param("accountpayBillno")String accountpayBillno,
                                                 Page<AccountHeadVo4ListEx> page);



    Long countsByAccountHead(
            @Param("type") String type,
            @Param("creatorArray") String[] creatorArray,
            @Param("billNo") String billNo,
            @Param("beginTime") String beginTime,
            @Param("endTime") String endTime);

    Long getMaxId();

    BigDecimal findAllMoney(
            @Param("supplierId") Integer supplierId,
            @Param("type") String type,
            @Param("modeName") String modeName,
            @Param("endTime") String endTime);

    List<AccountHeadVo4ListEx> getDetailByNumber(
            @Param("billNo") String billNo);

    int batchDeleteAccountHeadByIds(@Param("updateTime") Date updateTime, @Param("updater") Long updater, @Param("ids") String[] ids);

    List<AccountHead> getAccountHeadListByAccountIds(@Param("accountIds") String[] accountIds);

    List<AccountHead> getAccountHeadListByOrganIds(@Param("organIds") String[] organIds);

    List<AccountHead> getAccountHeadListByHandsPersonIds(@Param("handsPersonIds") String[] handsPersonIds);

}